Vue.component("aui-debug", {
    template: `
        <div class="aui-debug">
            <pre>{{showtext}}</pre>
        </div>
    `,
    props: {
        data: {
            type: Object
        }
    },
    computed: {
        showtext() {
            var self = this;
            if (self.data) {
                try {
                    return JSON.stringify(self.data, null, 2)
                } catch (e) {
                    return "parseerror";
                }
            }
            return "";
        }
    },
    data() {
        var ret = {};
        return ret;
    },
    methods: {
        setData: function (data) {
            this.data = data;
        }
    }
});